import request from '@/utils/request'

// 文件上传
export function uploadFile(data) {
  return request({
    url: '/common/upload',
    method: 'post',
    data: data
  })
}

// 文件保存
export function saveFile(params){
  return request({
    url:'/common/docupload/addfile',
    method:'get',
    params:params
  })
}

// 删除文件
export function deleteFile(ids) {
  return request({
    url: '/common/docupload/delfile/'+ids,
    method: 'delete'
  })
}

// 文件下载
export function downloadFile(params){
  return request({
    url:'/common/docupload/getfile',
    method:'get',
    params:params
  })
}

// 根据fileUrl删除文件
export function deleteFileByFileUrl(info){
  return request({
    url:'/common/docupload/delfileByUrl',
    method:'post',
    data:info
  })
}